-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Add unsubscribe link to email notifications #307
base: notification-preferences
Are you sure you want to change the base?
[feat] Add unsubscribe link to email notifications #307
Conversation
Implements and closes #132. --------- Co-authored-by: Federico Capoano <[email protected]> Co-authored-by: Gagan Deep <[email protected]>
- Updated the `NotificationSettingSerializer` to also include `organization_name`. - New endpoint `/api/user-setting/organization/<uuid:organization_id>/` to allow changes toggling of email/web notification settings of a particular org with just a single API call.
…ail and web checkboxes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick review of the code and found the following areas for improvement. I will do another round of functional testing and share my findings.
openwisp_notifications/static/openwisp-notifications/js/unsubscribe.js
Outdated
Show resolved
Hide resolved
openwisp_notifications/templates/openwisp_notifications/unsubscribe.html
Show resolved
Hide resolved
- Removed preference api endpoint and just used the `/user-setting` endpoint. - Fixed some bugs in preference page for handling few cases like enabling of global web setting when any one email setting is turned on (toggles it off). - Handled validation of only one global setting per user in model level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some conflicts here.
bdadba4
to
0feb0d2
Compare
Fixes: #256
FYR, Please note that this feature depends on PR #290 to manage global email notification preferences, which is not implemented in this PR. Currently, the user's first notification will be treated as their global email notification preference.
Regarding the email token generated: